package com.woniu.cq.medical.service;

import com.woniu.cq.medical.common.PageResult;
import com.woniu.cq.medical.common.Result;
import com.woniu.cq.medical.controller.form.DutyQueryForm;
import com.woniu.cq.medical.entity.Duty;
import com.baomidou.mybatisplus.extension.service.IService;

import java.text.ParseException;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Lucas
 * @since 2020-09-05
 */
public interface DutyService extends IService<Duty> {

    /**
     * 取得当前往后7天的的排班时间
     * @param doctorId
     * @return
     */
    List<Date> queryDutyDateList(Integer doctorId) throws ParseException;

    List<Duty> queryDutyList(Integer doctorId);

    Duty queryDutyFill(Integer doctorId, LocalDate localDate);

    /**
     * 为修改人数加1
     * @param dutyId
     * @param nowBookPeople
     * @return
     */
    int updateNowBookPeople(Integer nowBookPeople,Integer dutyId);

    PageResult pageQuery(int pageIndex, int pageSize, String administrativeName, String doctorName, Date dutyDateBefore, Date dutyDateAfter);

    Result modifyDoctorDuty(DutyQueryForm dutyQueryForm);
}
